package com.marketing.tenant.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestHeader;

import java.util.Map;

/**
 * 认证服务Feign客户端
 */
@FeignClient(name = "auth-service", url = "${auth.service.url:http://auth-service:8082}")
public interface AuthServiceClient {
    
    /**
     * 验证token并实现自动续期
     * 
     * @param authorization Authorization header containing the Bearer token
     * @return 验证结果
     */
    @PostMapping("/verify")
    ResponseEntity<Map<String, Object>> verifyToken(@RequestHeader("Authorization") String authorization);
}